<?php

function import_model($name) {
    $suffix = '_model';
    if (!class_exists($name . $suffix)) {
        require_once './application/models/' . $name . $suffix . '.php';
    }
}

function import_controller($name) {
    $cls = ucfirst($name);
    if (!class_exists($cls)) {
        require_once './application/controllers/' . $name . '.php';
    }
}

function plugin_tab() {
        ?>
<link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'js/tab/jquery.tabs.css' ?>" />
<script language="javascript" type="text/javascript" src="<?php echo base_url() . 'js/tab/jquery.tabs.pack.js' ?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo base_url() . 'js/tab/jquery.history_remote.pack.js' ?>"></script>
<?php
    }

    function init_tab($selector, $remote = false) {
?>
<script type="text/javascript" language="javascript">
    <?php if (!$remote) :?>
        $("<?php echo $selector ?>").tabs();
    <?php else :?>
        $("<?php echo $selector ?>").tabs({"remote": true});
    <?php endif; ?>    
</script>
<?php
    }

function new_line() {
?>
<div class="clearfix">&nbsp;</div>
<?php
    }
?>